# on local server 10.8.1.200
#

# download Solairs pkg from www.mysql.com
http://dev.mysql.com/downloads/

# Reading installation guide.
http://dev.mysql.com/doc/refman/5.1/en/installing.html

# Using pkgadd to install solaris package
pkgadd -d mysql<...>.pkg

# Pay attention that the the default datadir of mysql is located at /var/lib/mysql
# a seriers of file have been puted into the directory during installation. The
# traditional data dir <mysql_home_dir>/data have nothing in it.
# <mysql_base_dir>=/opt/mysql/mysql

bash-3.00# find /var/sadm/pkg/mysql/ -exec grep mydatadir {} \; -print
mydatadir=/var/lib/mysql
[ -d "$mydatadir"       ] || mkdir -p -m 755 "$mydatadir" || exit 1
[ -d "$mydatadir/mysql" ] || mkdir "$mydatadir/mysql"     || exit 1
[ -d "$mydatadir/test"  ] || mkdir "$mydatadir/test"      || exit 1
chown -R $myuser:$mygroup $mydatadir
        --datadir=$mydatadir
      -e "s,@datadir@,$mydatadir,g" "$script_in" > "$script"
/var/sadm/pkg/mysql/save/pspool/mysql/install/postinstall

#grep datadir support/mysql.server
datadir=/var/lib/mysql


/opt/mysql/mysql/bin/mysqld --basedir=/opt/mysql/mysql --datadir=/var/lib/mysql --user=mysql --default-storage-engine=InnoDB --log-error=/var/lib/mysql/sol10-test.err --open-files-limit=8192 --pid-file=/var/lib/mysql/sol10-test.pid --socket=/tmp/mysql.sock --port=3306
